home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Commodore Disk User Volume 4 #1
/
Commodore_Disk_User_Vol.4_1_1990_-.d64
/
money plus.bas
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
15KB
|
433 lines
1000 rem "money/plus 64" disk/tape,40col p.g.simonds 19/2/90
1010 rem budgets to nearest pound for expenses and incomes up to \9999.
1020 rem annual totals up to \99999.
1030 rem printouts can start at any month of the year.
1050 poke53280,0:poke53281,0:printchr$(147);chr$(30):print" welcome to"
1060 print:print" money/plus 64."
1100 e=30+1:i=10+1:l$="":forp=1to21:l$=l$+chr$(192):nextp:forp=1to4000:nextp
1110 dime(12,31):dimi(12,11):dime$(31):dimi$(11):dimmo$(12):dimet(12):dimit(12)
1120 dimmt(12):dimrt(12):sp$=" ":dimes$(31):dimis$(11)
1130 n=0:e=e-1:i=i-1:h$=chr$(176)+l$+chr$(174):b$=chr$(173)+l$+chr$(253)
1140 mo$(1)="jan":mo$(2)="feb":mo$(3)="mar":mo$(4)="apr":mo$(5)="may"
1150 mo$(6)="jun":mo$(12)="dec"
1160 mo$(7)="jul":mo$(8)="aug":mo$(9)="sep":mo$(10)="oct":mo$(11)="nov"
1170 e$(01)="expense 1 ":e$(02)="expense 2 ":e$(03)="expense 3 "
1180 e$(04)=" ":e$(05)=" ":e$(06)=" "
1190 e$(07)=" ":e$(08)=" ":e$(09)=" "
1200 e$(10)=" ":e$(11)=" ":e$(12)=" "
1210 e$(13)=" ":e$(14)=" ":e$(15)=" "
1220 e$(16)=" ":e$(17)=" ":e$(18)=" "
1230 e$(19)=" ":e$(20)=" ":e$(21)=" "
1240 e$(22)=" ":e$(23)=" ":e$(24)=" "
1250 e$(25)=" ":e$(26)=" ":e$(27)=" "
1260 e$(28)=" ":e$(29)=" ":e$(30)="last exp. "
1270 i$(01)="income 1 ":i$(02)="income 2 ":i$(03)="income 3 "
1280 i$(04)=" ":i$(05)=" ":i$(06)=" "
1290 i$(07)=" ":i$(08)=" ":i$(09)=" "
1300 i$(10)="last inc. "
1310 goto4000
2000 rem calculation routine
2010 n=1:z=0:y=0
2020 forp=1to12:et(p)=0:forr=1toe:et(p)=et(p)+e(p,r):nextr:z=z+et(p):nextp
2030 forp=1to12:it(p)=0:forr=1toi:it(p)=it(p)+i(p,r):nextr:y=y+it(p):nextp
2040 forp=1to12:mt(p)=it(p)-et(p):nextp
2050 printchr$(147):forp=1to6:print:nextp
2060 input" 1st month number";sm:ifsm<1orsm>12then2050
2070 rr=sm
2080 rt(sm)=mt(sm):x=rt(sm)
2090 forp=1to11
2100 sm=sm+1:ifsm=13thensm=1
2110 rt(sm)=x+mt(sm):x=rt(sm)
2120 nextp
2130 ifrt(sm)=y-zthen2150
2140 print"incorrect calculation!":stop
2150 sm=rr
3000 rem annual statement for screen
3010 sm=rr:ifsm=0thensm=1
3020 ul$=chr$(159)+" ===== ===== ======= ======":ac=mt(sm):printchr$(147);
3030 printchr$(159);" ";chr$(18);" annual statement ";chr$(146):print
3040 printchr$(155);" ";chr$(18);"credit";chr$(146);" ";
3050 printchr$(18);"debit";chr$(146);" ";chr$(18);"balance";chr$(146);" ";
3060 printchr$(18);"accum.";chr$(146):print
3070 forp=1to12:printchr$(158)" ";chr$(18);mo$(sm);chr$(146);" ";chr$(5);
3080 printright$(" "+str$(it(sm)),6);right$(" "+str$(et(sm)),6);
3090 printright$(" "+str$(mt(sm)),8);right$(" "+str$(ac),7)
3100 sm=sm+1:ifsm=13thensm=1
3110 ac=ac+mt(sm):nextp
3120 print" ";ul$;chr$(5)
3130 print" ";right$(" "+str$(y),9);
3140 printright$(" "+str$(z),6);
3150 printright$(" "+str$(y-z),8);right$(" "+str$(ac-mt(sm)),7)
3160 print" ";ul$:print:print:print" (press m,p,e or i)"
3170 geta$
3180 ifa$=""then3170
3190 ifa$="m"then4000
3200 ifa$="p"then5000
3210 ifa$="e"thensm=rr:bb$="e":goto8000
3220 ifa$="i"thensm=rr:bb$="i":goto8000
3230 goto3170
4000 rem menu
4010 sm=rr:ifsm=0thensm=1
4020 a1$=chr$(18)+" "+chr$(146)+chr$(5)+" "
4030 a2$=" "+chr$(153):a3$=" "+chr$(18)+chr$(155)+" "
4040 a3$=" "+chr$(18)+chr$(155)+" "
4050 a$=chr$(18)+" "+chr$(146)+" "+chr$(18)+" "
4060 printchr$(147);chr$(155);sp$;chr$(18);" "
4070 printsp$;chr$(155);chr$(18);" m e n u "
4080 printsp$;chr$(18);" ":printsp$;a$
4090 printsp$;a1$;"calculate.......";a2$;"c";a3$:printsp$;a$
4100 printsp$;a1$;"change headings.";a2$;"h";a3$:printsp$;a$
4110 printsp$;a1$;"monthly display.";a2$;"m";a3$:printsp$;a$
4120 printsp$;a1$;"printer.........";a2$;"p";a3$:printsp$;a$
4130 printsp$;a1$;"change income...";a2$;"i";a3$:printsp$;a$
4140 printsp$;a1$;"change expenses.";a2$;"e";a3$:printsp$;a$
4150 printsp$;a1$;"analyze data....";a2$;"a";a3$:printsp$;a$
4160 printsp$;a1$;"annual view.....";a2$;"y";a3$:printsp$;a$
4170 printsp$;a1$;"save file.......";a2$;"s";a3$:printsp$;a$
4180 printsp$;a1$;"load file.......";a2$;"l";a3$:printsp$;a$
4190 printsp$;chr$(18);" "chr$(146);chr$(19)
4200 getbb$
4210 xx=0
4220 ifbb$="c"andkk=1thenprintchr$(147);chr$(5);:goto4320
4230 ifbb$="i"orbb$="e"then8000
4240 ifbb$="h"then13000
4250 ifbb$="s"andkk=1then11000
4260 ifbb$="m"andn=1then9000
4270 ifbb$="y"andn=1then3000
4280 ifbb$="p"andn=1then5000
4290 ifbb$="a"andn=1then10000
4300 ifbb$="l"then12000
4310 goto4200
4320 forp=1to7:print:nextp:print" ";chr$(18);chr$(130);
4330 print" calculating. ";chr$(132);chr$(146):goto2000
5000 rem printer routine
5010 p1$=" ":p2$=p1$+p1$+p1$+p1$:printchr$(147):print
5020 printchr$(155);" is printer connected? (y/n)"
5025 y$="":gety$:ify$=""then5025
5027 ify$<>"y"then4000
5030 print:print:print" is printer loaded? (y/n)"
5035 y$="":gety$:ify$=""then5035
5037 ify$<>"y"then4000
5040 print:print:print" is printer turned on? (y/n)"
5050 y$="":gety$:ify$=""then5050
5055 ify$<>"y"then4000
5060 printchr$(5):print:input" date";dt$
5070 pa=0:print:print:input" page number 1 or 2";pa:ifpa<1orpa>2then4000
5080 print:print:printchr$(155);" annual/monthly statement? (a/m)"
5085 cc$="":getcc$:ifcc$=""then5085
5090 ifcc$="a"then6000
5100 ifcc$="m"then7000
5110 goto4000
6000 rem print annual budget
6010 open4,4:cmd4:gosub6380
6020 print"annual budget ";dt$:s=len(dt$)+14:gosub6380
6030 forp=1tos:print"=";:nextp:print:print
6040 lu$="============== ---- ---- ---- ---- ---- ---- ---- ---- ---- ----"
6050 lu$=lu$+" ---- ---- =====":gosub6380
6060 print"income ";:gosub6410:gosub6380:printlu$:sm=rr:forp=1toi
6070 ss=0:form=1to12:ss=ss+i(m,p):nextm
6080 ifi$(p)=" "andss=0then6130
6090 gosub6380:printmid$(str$(p)+" ",2,3);left$(i$(p),11);:form=1to12
6100 d=i(sm,p):printright$(" "+str$(d),5);
6110 sm=sm+1:ifsm=13thensm=1
6120 nextm:d=ss:printright$(" "+str$(d),6)
6130 nextp:gosub6380:printlu$
6140 gosub6380:print"totals ";:ss=0:form=1to12:d=it(sm):ss=ss+d
6150 printright$(" "+str$(d),5);:sm=sm+1:ifsm=13thensm=1
6160 nextm:d=ss:printright$(" "+str$(d),6):gosub6380:printlu$:print:print
6170 print:gosub6380:print"expenses ";:gosub6410:gosub6380:printlu$
6180 sm=rr:forp=1toe:ss=0:form=1to12:ss=ss+e(m,p):nextm
6190 ife$(p)=" "andss=0then6240
6200 gosub6380:printmid$(str$(p)+" ",2,3);:printleft$(e$(p),11);
6210 form=1to12:d=e(sm,p):printright$(" "+str$(d),5);
6220 sm=sm+1:ifsm=13thensm=1
6230 nextm:d=ss:printright$(" "+str$(d),6)
6240 nextp
6250 gosub6380:printlu$:gosub6380:print"totals ";:ss=0
6260 form=1to12:d=et(sm):ss=ss+d:printright$(" "+str$(d),5);
6270 sm=sm+1:ifsm=13thensm=1
6280 nextm:d=ss:printright$(" "+str$(d),6):gosub6380:printlu$:print:print
6290 print:gosub6380:print" ";:gosub6410:gosub6380:printlu$
6300 gosub6380:print"balances ";:ss=0:sm=rr:form=1to12
6310 d=mt(sm):ss=ss+d:printright$(" "+str$(d),5);:sm=sm+1:ifsm=13thensm=1
6320 nextm:d=ss:printright$(" "+str$(d),6):gosub6380:printlu$:print:print
6330 print:gosub6380:print" ";:gosub6410:gosub6380:printlu$
6340 gosub6380:print"accumulation ";:sm=rr:form=1to12:d=rt(sm)
6350 printright$(" "+str$(d),5);:sm=sm+1:ifsm=13thensm=1
6360 nextm:d=y-z:printright$(" "+str$(d),6):gosub6380:printlu$
6370 print#4:close4,4:goto4000
6380 rem print blank page one subroutine
6390 ifpa=2thenprintp2$;
6400 return
6410 rem print months subroutine
6420 sm=rr:forp=1to12:print" ";mo$(sm);:sm=sm+1:ifsm=13thensm=1
6430 nextp:print" total":return
7000 rem print monthly statement
7010 uu$="----------------------":printchr$(5):print
7020 input" number of month to be printed";m:ifm<1orm>12then4000
7030 open4,4:cmd4:printchr$(14);:gosub6380:printdt$:s=len(dt$):gosub6380
7040 forp=1tos:print"=";:nextp:print:print:gosub6380
7050 print"estimates for the month of ";mo$(m):gosub6380
7060 print"------------------------------":print:gosub6380
7070 print"income:- \":gosub6380:printuu$:forp=1toi
7080 ifi(m,p)=0ori$(p)=""then7100
7090 gosub6380:printi$(p);" ";right$(" "+str$(i(m,p)),4)
7100 nextp:gosub6380:printuu$:gosub6380
7110 print"total income ";right$(" "+str$(it(m)),6):gosub6380
7120 printuu$:print:gosub6380:print"expenses:- \"
7130 gosub6380:printuu$:forp=1toe
7140 ife(m,p)=0ore$(p)=""then7160
7150 gosub6380:printe$(p);" ";right$(" "+str$(e(m,p)),4)
7160 nextp
7170 gosub6380:printuu$:gosub6380
7180 print"total expenses ";right$(" "+str$(et(m)),6):gosub6380
7190 printuu$:print:gosub6380:printuu$:gosub6380
7200 print"balance ";right$(" "+str$(mt(m)),6)
7210 gosub6380:printuu$:print:gosub6380:printuu$:gosub6380
7220 print"accumulation ";right$(" "+str$(rt(m)),6):gosub6380:printuu$
7230 print#4,chr$(15):print#4:close4,4:goto4000
8000 rem data check and change routine
8010 fd=0:md$="e":ifbb$="i"thenmd$="i"
8020 ca$=chr$(5)+chr$(18)+chr$(130)+chr$(157)+chr$(157)+chr$(157)
8030 ca$=ca$+"calculating"+chr$(132)+chr$(146)
8040 r$="":forp=1to24:r$=r$+chr$(29):nextp
8050 co=sm:kk=1:ro=1:ifsm=0thensm=1:co=sm
8060 c$=chr$(158)+chr$(130)+chr$(175)+chr$(132)+chr$(5)+chr$(157)
8070 iffd=0thengoto8440
8080 hh$="":gethh$:ifhh$=""then8080
8085 ifhh$=chr$(145)thenro=ro-1:ifro<1thenro=1:goto8350
8090 ifhh$=chr$(145)then8350
8100 ifhh$=chr$(17)andbb$="e"andro<ethenro=ro+1:goto8350
8110 ifhh$=chr$(17)andbb$="i"andro<ithenro=ro+1:goto8350
8120 ifhh$=chr$(29)thenco=co+1:ifco>12thenco=1:goto8350
8130 ifhh$=chr$(157)thenco=co-1:ifco<1thenco=12:goto8350
8140 ifhh$=chr$(29)orhh$=chr$(157)then8350
8150 ifhh$="e"andbb$="e"then8080
8160 ifhh$="e"thenbb$="e":ro=1:co=sm:goto8350
8170 ifhh$="i"andbb$="i"then8080
8180 ifhh$="i"thenbb$="i":ro=1:co=sm:goto8350
8190 ifhh$="c"thenn=0:printc$;:bn$="":goto8240
8200 ifhh$="m"andn=1then4000
8210 ifhh$="y"andn=1thensm=rr:goto3000
8220 ifhh$="m"thenprintca$:sm=rr:goto2000
8230 goto8080
8240 nu$="":getnu$:ifnu$=""then8240
8243 ifnu$=chr$(13)then8280
8245 ifnu$="a"then8310
8250 ifasc(nu$)-48<0orasc(nu$)-48>10then8240
8260 bn$=bn$+nu$:iflen(bn$)>4then8280
8270 printnu$;c$;:goto8240
8280 nu=val(left$(bn$,4))
8290 ifbb$="e"thene(co,ro)=nu:nu=0:goto8350
8300 ifbb$="i"theni(co,ro)=nu:nu=0:goto8350
8310 nu=val(left$(bn$,4))
8320 forp=1to12
8330 ifbb$="e"thene(p,ro)=nu
8335 ifbb$="i"theni(p,ro)=nu
8340 nextp:nu=0
8350 printchr$(19);chr$(5);chr$(146):print:print:printleft$(r$,13);
8360 ifbb$="e"thenprint"e x p e n s e s":goto8370
8365 print" i n c o m e "
8370 print:print:print:print:printr$;chr$(18);chr$(158);" ";mo$(co);" "
8380 print:print:printleft$(r$,14);chr$(153);mid$((str$(ro)+" "),2,2);
8390 ifbb$="e"thenprintleft$(r$,2);e$(ro):goto8400
8395 printleft$(r$,2);i$(ro)
8400 print:print:print:printleft$(r$,12);chr$(153);
8410 ifbb$="e"thenprintmid$((str$(e(co,ro))+" "),2,5);chr$(29);
8420 ifbb$="i"thenprintmid$((str$(i(co,ro))+" "),2,5);chr$(29);
8430 printleft$(r$,5);" ";:forp=1to5:printchr$(157);:nextp:goto8080
8440 fd=1:printchr$(147):printchr$(155);sp$;chr$(18);h$
8450 ed$=sp$+chr$(18)+chr$(125)+chr$(146)+" "+chr$(18)
8460 ed$=ed$+chr$(125):printed$:printed$:printed$
8470 printsp$;chr$(18);b$:print
8480 printsp$;chr$(18);h$
8490 print" ";chr$(158);"<left> ";chr$(155);chr$(18);chr$(125);
8500 print" m o n t h ";chr$(146);" ";chr$(18);chr$(125);chr$(146);
8510 printchr$(158);" <right>";
8520 printchr$(155);sp$;chr$(18);b$:print
8530 printsp$;chr$(18);left$(h$,7);chr$(178);right$(h$,15)
8540 print" ";chr$(153);"<up> ";chr$(155);chr$(18);chr$(125);"row ";
8550 printchr$(146);" ";chr$(18);chr$(125);chr$(146);" ";chr$(18);
8560 printchr$(125);chr$(146);chr$(153);" <down>";chr$(155)
8570 printsp$;chr$(18);left$(b$,7);chr$(177);right$(b$,15):print
8580 printsp$;left$(h$,10);chr$(178);right$(h$,12)
8590 printsp$;chr$(125);sp$;chr$(125);sp$;" ";chr$(125)
8600 printsp$;left$(b$,10);chr$(177);right$(b$,12):print
8610 printsp$;chr$(18);" "
8620 printsp$;chr$(18);" ";chr$(158);"1 to change press [c]";chr$(155);" "
8630 printsp$;chr$(18);" ";chr$(158);"2 use return to enter";chr$(155);" "
8640 printsp$;chr$(18);" ";chr$(158);"3 change all year [a]";chr$(155);" "
8650 printsp$;chr$(18);" ";chr$(158);"4 to quit press [m] ";chr$(155);" "
8660 printsp$;chr$(18);" ";:goto8350
9000 rem monthly preview on screen
9010 sm=rr:printchr$(147);chr$(153);"press up,";chr$(18);chr$(155);
9020 print"income "chr$(5);mo$(sm);chr$(155);" ":sc=1
9030 forp=1toi
9040 ifi(sm,p)=0then9080
9050 printsp$;chr$(18);chr$(155);mid$(str$(p)+" ",2,3);
9060 printchr$(18);i$(p);" ";chr$(146);chr$(5);
9070 printright$(" "+str$(i(sm,p)),5);chr$(155);chr$(18);" ":sc=sc+1
9080 nextp
9090 printchr$(153);"down,m,p,";chr$(155);chr$(18);"total income =";chr$(5);
9100 printchr$(18);right$(" "+str$(it(sm)),5);chr$(155);" "
9110 printchr$(153);"y,e or i.";chr$(158);chr$(18);"expenses "
9120 sc=sc+2:forp=1toe
9130 ife(sm,p)=0then9170
9140 printsp$;chr$(158);chr$(18);mid$(str$(p)+" ",2,3);
9150 printe$(p);" ";chr$(146);chr$(5);
9160 printright$(" "+str$(e(sm,p)),5);chr$(158);chr$(18);" ":sc=sc+1
9165 ifsc=24thenprintchr$(130);"any key.";chr$(145)
9167 ifsc=24thensc$="":getsc$:ifsc$=""then9167
9170 nextp
9180 printsp$;chr$(158);chr$(18);"total expenses =";chr$(5);
9190 printright$(" "+str$(et(sm)),5);chr$(158);" "
9200 printsp$;chr$(18);chr$(159);"balance =";
9210 printchr$(18);right$(" "+str$(mt(sm)),5);chr$(159);" ";
9220 printchr$(155);chr$(19)
9230 a$=""
9240 a$="":geta$:ifa$=""then9240
9250 ifa$="i"thenbb$="i":goto8000
9260 ifa$="e"thenbb$="e":goto8000
9270 ifa$="m"thensm=rr:goto4000
9280 ifa$="y"thensm=rr:goto3000
9290 ifa$="p"thensm=rr:goto5000
9300 printchr$(147);chr$(153);"press up,";chr$(155);chr$(18);
9310 ifa$=chr$(145)thensm=sm+10
9320 sm=sm+1:ifsm>12thensm=sm-12
9330 goto9020
10000 rem expense and income annual analysis
10010 sm=rr:printchr$(147):print:print:print
10020 printsp$;chr$(18);chr$(159);" analysis of expenses "
10030 print
10040 printsp$;chr$(18);" or income? ";chr$(130);" (e or i) ";chr$(5);chr$(132)
10050 d$="":getd$:ifd$=""then10050
10060 ifd$="i"then10090
10070 ifd$="e"then10100
10080 goto4000
10090 print:print:printsp$;"income number for analysis.":goto10110
10100 print:print:printsp$;"expense number for analysis."
10110 f=1:print:input" ";f:printchr$(147)
10120 iff>eorf<1thenprintchr$(19):goto10060
10130 iff>iandd$="i"thenprintchr$(19):goto10060
10140 printchr$(19);sp$;chr$(5);"analysis of"
10150 print
10160 xx=0
10170 printsp$;
10180 ifd$="i"thenprintchr$(18);i$(f);chr$(146);chr$(153);f;chr$(157);" "
10190 ifd$="e"thenprintchr$(18);e$(f);chr$(146);chr$(153);f;chr$(157);" "
10200 print
10210 forp=1to12
10220 printsp$;chr$(18);chr$(159);mo$(sm);chr$(146);chr$(5);" ";
10230 ifd$="i"thend=i(sm,f)
10240 ifd$="e"thend=e(sm,f)
10250 xx=xx+d
10260 printright$(" "+str$(d),5)
10270 sm=sm+1:ifsm=13thensm=1
10280 nextp
10290 print:printsp$;"============"
10300 printsp$;"total ";
10310 printright$(" "+str$(xx),5)
10320 printsp$;"============":print
10330 printsp$;chr$(153);"cursor <up> or <down>":print
10340 printsp$;chr$(5);"analysis or menu? (a/m)"
10350 e$="":gete$:ife$=""then10350
10360 ife$=chr$(145)andf>1thenf=f-1:goto10120
10370 ife$="m"then4000
10380 ife$="a"then10000
10390 ife$=chr$(17)andd$="i"andf<ithenf=f+1:goto10120
10400 ife$=chr$(17)andd$="e"andf<ethenf=f+1:goto10120
10410 goto10350
11000 rem save file to disk or tape
11010 printchr$(147):ify=0orz=0then4000
11020 printchr$(147);chr$(155);chr$(130):forp=1to6:print:nextp:p$=""
11030 print" save on tape or disk? (t or d)":printchr$(132)
11035 p$="":getp$:ifp$=""then11035
11040 ifp$="t"orp$="d"then11050
11045 goto4000
11050 printchr$(147);chr$(5):forp=1to6:print:nextp:printsp$;" ";
11060 printchr$(130);chr$(18);" saving file. ";chr$(132);chr$(146):print
11070 ifp$="d"thenopen1,8,2,"@0:expenses,s,w":goto11080
11075 open1,1,1,"expenses"
11080 forc=1to12:forr=1toe:print#1,e(c,r):nextr:nextc:close1
11090 ifp$="d"thenopen3,8,2,"@0:expheads,s,w":goto11100
11095 open3,1,1,"expheads"
11100 forc=1toe:es$(c)="f"+e$(c)+"b":print#3,es$(c):nextc:close3
11110 ifp$="d"thenopen2,8,2,"@0:income,s,w":goto11120
11115 open2,1,1,"income"
11120 forc=1to12:forr=1toi:print#2,i(c,r):nextr:nextc:close2
11130 ifp$="d"thenopen4,8,2,"@0:incheads,s,w":goto11140
11135 open4,1,1,"incheads"
11140 forc=1toi:is$(c)="f"+i$(c)+"b":print#4,is$(c):nextc:close4
11150 goto4000
12000 rem load file from disk or tape
12010 printchr$(147);chr$(155):forp=1to6:print:nextp:print" ";
12020 p$="":print"load from tape or disk? (t or d)"
12025 p$="":getp$:ifp$=""then12025
12030 ifp$="d"orp$="t"then12040
12035 goto4000
12040 printchr$(147):forp=1to6:print:nextp:printsp$;" ";
12050 printchr$(130);chr$(5);chr$(18);" loading file. ";chr$(132);chr$(146)
12060 ifp$="d"thenopen1,8,2,"0:expenses,s,r":goto12070
12065 open1,1,0,"expenses"
12070 forc=1to12:forr=1toe:input#1,e(c,r):nextr:nextc:close1
12080 ifp$="d"thenopen3,8,2,"0:expheads,s,r":goto12090
12085 open3,1,0,"expheads"
12090 forc=1toe:input#3,es$(c):e$(c)=mid$(es$(c),2,12):nextc:close3
12100 ifp$="d"thenopen2,8,2,"0:income,s,r":goto12110
12105 open2,1,0,"income"
12110 forc=1to12:forr=1toi:input#2,i(c,r):nextr:nextc:close2
12120 ifp$="d"thenopen4,8,2,"0:incheads,s,r":goto12130
12125 open4,1,0,"incheads"
12130 forc=1toi:input#4,is$(c):i$(c)=mid$(is$(c),2,12):nextc:close4
12140 kk=1:printchr$(147);chr$(5):forp=1to6:print:nextp:print" ";
12150 printchr$(18);chr$(130);" calculating. ";chr$(132);chr$(146):goto2000
13000 rem change expenses and income headings
13010 printchr$(147);chr$(155);
13020 print"change heading for expense/income (e/i)?":print
13030 print"check headings or goto menu (c/m)?"
13040 ch$="":getch$:ifch$=""then13040
13043 ifch$="e"then13060
13045 ifch$="i"then13140
13047 ifch$="c"then13230
13048 goto4000
13050 ifch$="c"then13230
13055 goto4000
13060 print:print"which expense number is to be changed?"
13070 print"[ 1 - ";e;"]":print
13080 lc=0:inputlc:iflc<1orlc>ethen4000
13090 print:print" ";e$(lc)
13100 print" >------------< (12 characters only)";chr$(145);chr$(145)
13110 es$(lc)="":inputes$(lc):ifes$(lc)=""thenes$(lc)=" "
13120 e$(lc)="":e$(lc)=left$(es$(lc)+" ",12)
13130 goto13300
13140 print
13150 print"which income number is to be changed?"
13160 print"[ 1 - ";i;"]":print
13170 lc=0:inputlc:iflc<1orlc>ithen4000
13180 print:print" ";i$(lc)
13190 print" >------------< (12 characters only)";chr$(145);chr$(145)
13200 is$(lc)="":inputis$(lc):ifis$(lc)=""thenis$(lc)=" "
13210 i$(lc)="":i$(lc)=left$(is$(lc)+" ",12)
13220 goto13230
13230 printchr$(147);"income no."
13240 print"================="
13250 lc=1
13260 printi$(lc);right$(" "+str$(lc),4):lc=lc+1
13270 iflc<(i+1)then13260
13280 print:print"press [i] to change income.";chr$(145)
13290 ch$="":getch$:ifch$=""then13290
13295 ifch$="i"then13150
13300 printchr$(147);
13310 print"expense no. expense no."
13320 print"================= ================="
13330 lc=1:ha=int((e+1)/2)
13350 printe$(lc);right$(" "+str$(lc),4);" ";
13360 if(lc+ha)<=ethenprinte$(lc+ha);" ";(lc+ha):goto13370
13365 print
13370 lc=lc+1
13380 iflc<(int((e+1)/2)+1)then13350
13390 print:print"press [e] to change expense."
13400 ch$="":getch$:ifch$=""then13400
13405 ifch$="e"thenprintchr$(145);chr$(145);:goto13060
13410 goto4000